package cn.dckeji.dcssm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 异常记录表
 * </p>
 *
 * @author Kenny
 * @since 2019-03-04
 */
@TableName("system_error_log")
@ApiModel(value="ErrorLog对象", description="异常记录表")
public class ErrorLog extends Model<ErrorLog> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "ip")
    @TableField("ip")
    private String ip;

    @ApiModelProperty(value = "类名")
    @TableField("class_name")
    private String className;

    @ApiModelProperty(value = "方法名")
    @TableField("method_name")
    private String methodName;

    @ApiModelProperty(value = "异常类型")
    @TableField("exception_type")
    private String exceptionType;

    @ApiModelProperty(value = "0:未查看,1:已查看")
    @TableField("is_view")
    private Integer view;

    @ApiModelProperty(value = "异常消息")
    @TableField("exception_msg")
    private String exceptionMsg;

    @ApiModelProperty(value = "创建时间")
    @TableField("gmt_create")
    private LocalDateTime gmtCreate;

    @ApiModelProperty(value = "修改时间")
    @TableField("gmt_modified")
    private LocalDateTime gmtModified;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getExceptionType() {
        return exceptionType;
    }

    public void setExceptionType(String exceptionType) {
        this.exceptionType = exceptionType;
    }

    public Integer getView() {
        return view;
    }

    public void setView(Integer view) {
        this.view = view;
    }

    public String getExceptionMsg() {
        return exceptionMsg;
    }

    public void setExceptionMsg(String exceptionMsg) {
        this.exceptionMsg = exceptionMsg;
    }

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public LocalDateTime getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(LocalDateTime gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ErrorLog{" +
        "id=" + id +
        ", ip=" + ip +
        ", className=" + className +
        ", methodName=" + methodName +
        ", exceptionType=" + exceptionType +
        ", view=" + view +
        ", exceptionMsg=" + exceptionMsg +
        ", gmtCreate=" + gmtCreate +
        "}";
    }
}
